import { Column, Entity, PrimaryColumn } from 'typeorm';
import { ApiProperty } from '@midwayjs/swagger';
import { Rule, RuleType } from '@midwayjs/validate';
@Entity({
  name: 'address',
  synchronize: false,
})
export class address {
  @ApiProperty({ example: 'Ad00001' })
  @Rule(RuleType.string().min(0).required())
  @PrimaryColumn({ type: 'varchar', length: 32 })
  addressCode: string;
  @ApiProperty({ example: '潍坊-寿光市稻田镇阁后张村' })
  @Rule(RuleType.string().allow(null).min(0).required())
  @Column({ type: 'varchar', length: 32 })
  addressName: string;
  @ApiProperty({ example: '潍坊' })
  @Rule(RuleType.string().allow(null).min(0).required())
  @Column({ type: 'varchar', length: 32 })
  cityName: string;
  @ApiProperty({ example: 'ar00001' })
  @Rule(RuleType.string().allow(null).min(0).required())
  @PrimaryColumn({ type: 'varchar', length: 32 })
  addressFk: string;
}
